# a quickly hacked extract method for ictreg models for use with texreg
extract.ictreg <- function(model, include.nobs=TRUE, include.llk=TRUE, ...) {
  s <- summary(model,...)
  names <- c(paste("sentitive:",names(s$par.treat)),paste("control:",names(s$par.treat))) 
  co <- c(s$par.treat,s$par.control)
  se <- c(s$se.treat,s$se.control)
  n <- length(s$y)
  llk<- s$llik
  gof <- numeric()
  gof.names <- character()
  gof.decimal <- logical()
  if (include.nobs==TRUE) {
    gof <- c(gof, n)
    gof.names <- c(gof.names, "Num.\ obs.")
    gof.decimal <- c(gof.decimal, FALSE)
  }
  if (include.llk==TRUE) {
    gof <- c(gof, llk)
    gof.names <- c(gof.names, "log likelihood")
    gof.decimal <- c(gof.decimal, FALSE)
  }
  tr <- createTexreg(
    coef.names=names,
    coef=co,
    se=se,
    gof.names=gof.names,
    gof=gof,
    gof.decimal=gof.decimal
                     )
  return(tr)
}

setMethod("extract", signature=className("ictreg", package="list"),
    definition = extract.ictreg)
##END
